package bloomersseeds2340

class User {
    
    String email
    String password
    String firstName
    String lastName
    String gender
    String city
    String state
    String country
    String zipcode
    Date dateOfBirth
    String role = "user"
    
    def seedArr = new ArrayList()
    
    static constraints = {
        email(email:true)
        password(blank:false, password:true)
        dateOfBirth()
        role(inList:["admin", "user"])
    }
    static transients = ['admin'] 
   
    boolean isAdmin(){ 
    return role == "admin"
    }
    String toString(){
        email
    }
}
